<header class="nav_header">
    <!--    ps-->
    <div class="w nav_container uk-visible@m">
        <h1 class="nav_logo">
            <a href="/" style="display: flex">
                <img src="https://blog.dbsgw.com/logo.png" alt="logo">
            </a>
        </h1>
        <nav class="nav">
            <a href="/">首页</a>
            {{range $index,$elem := .Sort}}
            <a href="/sort/{{$elem.id}}">{{$elem.title}}</a>
            {{end}}
            {{if .Cookie}}
            <a href="/admin/home">管理中心</a>

            {{else}}
            <a href="/admin/login">登录</a>

            {{end}}
        </nav>
    </div>
    <!--    web-->
    <div class="w nav_container uk-hidden@m">
        <h1 class="nav_logo">
            <a  href="/" style="display: flex">
                <img src="https://blog.dbsgw.com/logo.png" alt="logo">
            </a>
        </h1>
        <div style="padding-right: 20px">
            <svg style="width: 30px;cursor: pointer;" t="1636874439427" uk-toggle="target: #offcanvas-overlay"
                 class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2405"
                 width="200" height="200">
                <path d="M141.93 191.76h740.15v48H141.93zM141.93 495.28h740.15v48H141.93zM141.93 798.8h740.15v48H141.93z"
                      p-id="2406" fill="#999999"></path>
            </svg>
        </div>
        <!--web的nav-->
        <div id="offcanvas-overlay" uk-offcanvas="overlay: true">
            <div class="uk-offcanvas-bar">

                <button class="uk-offcanvas-close" type="button" uk-close></button>


                <!--                <h3>前端笔记</h3>-->

                <nav class="nav web_nav">
                    <a href="/">首页</a>
                    {{range $index,$elem := .Sort}}
                    <a href="/sort/{{$elem.id}}">{{$elem.title}}</a>
                    {{end}}
                    {{if .Cookie}}
                    <a href="/admin/home">管理中心</a>

                    {{else}}
                    <a href="/admin/login">登录</a>

                    {{end}}
                </nav>
            </div>
        </div>
        <style>
            .web_nav a {
                display: block;
            }
        </style>

        <!--        <nav class="nav">-->
        <!--            <a href="/">首页</a>-->
        <!--            {{range $index,$elem := .Sort}}-->
        <!--            <a href="/sort/{{$elem.id}}">{{$elem.title}}</a>-->
        <!--            {{end}}-->
        <!--            <a href="/admin/login">登录</a>-->
        <!--        </nav>-->
    </div>

</header>
